package com.sina.shop.eureka.consume.service.log;

import com.sina.shop.domain.log.Log;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description: 调用服务，并配置断路器，当调用出错时调用默认的配置。使用Feign配置Hystrix
 * 未测试！！！！！
 * 段浩杰   2018-02-08-14:40
 */
@FeignClient(value = "SHOP-SPRING-CLOUD-LOG", fallback = LogServicesImpl.class)
public interface LogServices {

    @RequestMapping(value = "/log/getLog", method = RequestMethod.GET)
    Log getLog(Long id);

    @RequestMapping(value = "/log/getLogList", method = RequestMethod.GET)
    List<Log> getLogList(Log log);

    @RequestMapping(value = "/log/saveLog", method = RequestMethod.POST)
    Log saveLog(Log log);

    @RequestMapping(value = "/log/deleteLog", method = RequestMethod.POST)
    Integer deleteLog(Long id);

}
